// @ts-nocheck
/**
 * @Date: 2022-03-07 18:39:53
 * @LastEditors: sailornpg
 * @LastEditTime: 2022-03-07 18:52:12
 * @FilePath: \zhihuReal\routes\ddd.js
 * @Description: 路由自动注册脚本
 */
const fs = require('fs')
module.exports = (app) => {
    fs.readFileSync(__dirname).forEach(file => {
        if (file === 'ddd.js') {
            return;
        }
        const route = require(`./${file}`)
        app.use(route.routes()).use(route.allowedMethods())
    })
}